import { request } from '@/common/request'
const api = {
	wxLogin: (data : { code : string }) => {
		return request({
			data,
			url: '/atWxUser/login?code=' + data.code,
			method: 'post',
		})
	},
	passwordLogin: (data : any) => {
		return request({
			data,
			url: '/atWxUser/pcLogin',
			method: 'post',
		})
	},
	checkCode: () => {
		return request<{ captcha : string, uuid : string }>({
			url: '/captchaImage',
			method: 'get',
		})
	},
	getUserInfo: () => {
		return request({
			url: '/atWxUser/findUserInfo',
			method: 'GET',
		})
	},
	editUserInfo: (data : any) => {
		return request({
			data,
			url: '/atWxUser/updatePersonageInfo',
			method: 'put',
		})
	},
	// ------------------------ 获取配置 ----------------
	getSetting: (type : string) => {
		return request({
			data: { type },
			url: '/atPcAcademy/findAcademy',
			method: 'get',
		})
	},

	userRegister: (data : any) => {
		return request({
			data,
			url: '/atWxUser/accountRegister',
			method: 'post',
		})
	},
	brokerRegister: (data : any) => {
		return request({
			data,
			url: '/atFrontUser/applyForArtBroker',
			method: 'put',
		})
	},

	getDemandList: (data : any) => {
		return request({
			data,
			url: `/atApplet/findDemandList`,
			method: 'get',
		})
	},
	getAchievementList: (data : any) => {
		return request({
			data,
			url: `/atApplet/findAchievementList`,
			method: 'get',
		})
	},
	findTalentPoolMessage: (data : any) => {
		return request({
			data,
			url: `/atApplet/findTalentPoolMessage`,
			method: 'get',
		})
	},
	

}
export default api